if ( SERVER ) then
	AddCSLuaFile( "shared.lua" )
	SWEP.HoldType = "smg1"
end

if ( CLIENT ) then
	SWEP.PrintName = "Deer Rifle"
	SWEP.Author = "orson250"
	SWEP.Slot = 4
	SWEP.SlotPos = 1
	SWEP.IconLetter = "w"
	killicon.AddFont( "weapon_ak47", "CSKillIcons", SWEP.IconLetter, Color( 255, 80, 0, 255 ) )
end

SWEP.Base = "weapon_cs_base"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.ViewModel = "models/weapons/v_Rifle.mdl"
SWEP.WorldModel = "models/weapons/w_snip_awp.mdl"
SWEP.Weight = 5
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
SWEP.Primary.Sound = Sound( "weapons/rifle/rifle.wav" )
SWEP.Primary.Recoil = 2
SWEP.Primary.Damage = 100
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0.01
SWEP.Primary.ClipSize = 4
SWEP.Primary.Delay = 1
SWEP.Primary.DefaultClip = 50
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "smg1"
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"

zoom = 0

function SWEP:SecondaryAttack()
	if (Zoom == 0) then
		if(SERVER) then
			self.Owner:SetFOV( 45, 0 )
		end
		Zoom = 1
	elseif (Zoom == 1) then
		if(SERVER) then
			self.Owner:SetFOV( 25, 0 )
		end
		Zoom = 2
	else
		if(SERVER) then
			self.Owner:SetFOV( 0, 0 )
		end
		Zoom = 0
	end
end

function SWEP:Holster()
	self.Owner:SetFOV( 0, 0 )
	ScopeLevel = 0
	return true
end



